/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hhf.worldzones.entities;

import hhf.flex.annotations.entities.FlexChildren;
import java.util.Collection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

/**
 *
 * @author HHFrancois
 */
@Entity
public class Country extends Zone {

	private static final long serialVersionUID = 2L;
	@ManyToOne
	private Continent continent;

	@FlexChildren
	@OneToMany(mappedBy = "country")
	private Collection<Region> regions;

	@ManyToMany(fetch = FetchType.EAGER)
	private Collection<Language> languages;

	/**
	 * @return the regions
	 */
	public Collection<Region> getRegions() {
		return regions;
	}

	/**
	 * @param regions the regions to set
	 */
	public void setRegions(Collection<Region> regions) {
		this.regions = regions;
	}

	/**
	 * @return the languages
	 */
	public Collection<Language> getLanguages() {
		return languages;
	}

	/**
	 * @param languages the languages to set
	 */
	public void setLanguages(Collection<Language> languages) {
		this.languages = languages;
	}

	/**
	 * @return the continent
	 */
	public Continent getContinent() {
		return continent;
	}

	/**
	 * @param continent the continent to set
	 */
	public void setContinent(Continent continent) {
		this.continent = continent;
	}
}
